<?
	$oModBase =& loadModule('base');
	$cUlrImagenes = $oModBase->getUrlImages();
	$cRefresh = getParam(PARAM_REFRESH);
	if ( $cRefresh != 'head' ) echo "</div>";
	$oMenu = new Menu('body', 'menu1', 'menu1', true);
	$oMenu->setMuestraSelector(true, " color: #F00; background-image: url(".$cUlrImagenes."/libro2.jpg);");
	$cSql = "SELECT ncMenu, cdMenu, cUrl, bExpandido, cDescripcion FROM gtMenu WHERE ncEstadoPublicacion = 2 AND ncMenuPadre = 1";
	$oRs = $this->oDatabase->recordset($cSql);
	while ( $oRs->moveNext() )
	{
		$cUrl = substr($oRs->aFields['cUrl'], 0, 7) == 'http://' ? $oRs->aFields['cUrl'] : '?' . $oRs->aFields['cUrl'] . '&amp;ncMenu=' . $oRs->aFields['ncMenu'];
		$oMenu->addItem( extractLanguage( $oRs->aFields['cdMenu'], $this->getLanguage()) , $cUrl, 'body', $oRs->aFields['cDescripcion'], $oRs->aFields['bExpandido'] );
	}
	//if ( !$this->oUserSession->isLogged() ) 

	$oInputUsuario	 = new InputText  ( 'Usuario', "cUsuario", $_COOKIE['cUsuario']);
	$oInputClave	 = new InputText  ( 'Contrase&ntilde;a', "cClave" );
	$oInputUsuario->setStyle('background-color: #fff; border: none; color: #000; width:150px; height: 15px');
	$oInputClave->setStyle('margin-top: 2px; background-color: #fff; border: none; color: #000; width:150px; height: 15px');
	$oInputUsuario->setEmptyText('Usuario');
	$oInputUsuario->setLength(60);
	$oInputClave->setLength(20);
	$oInputClave->setPassword(true);

?>
	<div id="menu1" style='overflow: hidden; clear: none; height: 50px; width: 800px; padding-left: 5px;' >
		<? $oMenu->make(); ?>
	</div>

	<div style='float: left; background-image: url( <?= $cUlrImagenes ?>/borde_top_izq.gif); height: 20px; width: 20px;'></div>
	<div style='float: left; background-color: #3A6496; height: 20px; width: 760px;'></div>
	<div style='float: left; background-image: url( <?= $cUlrImagenes ?>/borde_top_der.gif); height: 20px; width: 20px;'></div>
	<div style='float: left; background-color: #3A6496; height: 80px; width: 600px;'><h1><img src="<?=$cUlrImagenes?>/logo.gif" width="380" height="80" style="border: none" alt="librosar" /></h1></div>
	<div style='float: left; background-color: #3A6496; height: 80px; width: 200px;'>
		<form name='frmLogin' id='frmLogin'  action='?mo=seguridad&ac=1' onsubmit='javascript: if ( checkForm(this) ) { sendForm( "?mo=seguridad&ac=1&ts=2&me=1&rf=action", "frmLogin", refreshLogin, "body_main", false  ); } return false;'  method='post'  >
			<?= $oInputUsuario->make();?><br/>
			<?= $oInputClave->make();?><br/>
			<?
				if ( $this->oUserSession->isLogged() ) 
				{
					echo "  <a onclick='send(\"?ac=2&amp;rf=action&amp;mo=portal\",refreshElement, \"body_main\")'>Mi cuenta</a> | <a href='?ac=4&mo=seguridad'>Salir</a>";
				} else
					echo " <input type='submit' class='ingresar' value='Ingresar' />";
				echo "<br/>";
			?>
		</form>		
	</div>
<?
	if ( $cRefresh != 'head' ) echo "</div>";
?>